<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择应用')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-app_id" data-rule="required" min="0" data-source="app/index" class="form-control selectpage" data-primary-key="app_id"  data-field="app_name" data-search-field="app_name" name="row[app_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择分组')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-config_type" data-rule="required" data-source="appconfigtype/index" class="form-control selectpage" data-primary-key="id"  data-field="name" data-search-field="name" name="row[config_type]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('变量名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-config_name" data-rule="required" class="form-control" name="row[config_name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('中文名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-config_desc" data-rule="required" class="form-control" name="row[config_desc]" type="text"
                   value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配置值类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-config_value_type" name="row[config_value_type]" class="form-control">
                {foreach name="config_value_type_list" item="value" }
                    <option value="{$key}">{$value}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配置值填写')}:</label>
        <div class="col-xs-12 col-sm-8" id="c-config_value_dom">

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配置权限')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="col-xs-12 col-sm-8">
                {:build_radios('row[config_purview]', ['10'=>__('私有'), '20'=>__('公开')],10)}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配置备注信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" data-rule="required" class="form-control" name="row[remark]"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
